package com.marui.ch3;

import java.util.concurrent.atomic.AtomicInteger;


public class UseAtomicInt {
	
	static AtomicInteger ai = new AtomicInteger(10);
	
    public static void main(String[] args) {
		//10--->11
    	System.out.println(ai.getAndIncrement());
		System.out.println(ai.get());
		//11--->12--->out
    	System.out.println(ai.incrementAndGet());
    	System.out.println(ai.get());

    }
}
